package Buttons 
{
	import flash.events.MouseEvent;
	/**
	 * ...
	 * @author ...
	 */
	public class Button extends MovieClip
	{
		protected var btn:MovieClip;
		
		public function Button(btnReference:MovieClip, x:int, y:int) 
		{
			this.btn = btnReference;
			
			this.btn.x = x;
			this.btn.y = y;
			
			this.btn.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown, false, 0, true);
			this.btn.addEventListener(MouseEvent.MOUSE_UP, MouseUp, false, 0, true);
			
			this.addChild(btn);
		}
		
		public function setReference(btnReference:MovieClip) 
		{
			this.btn = btnReference;
			this.btn.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown, false, 0, true);
			this.btn.addEventListener(MouseEvent.MOUSE_UP, MouseUp, false, 0, true);
			
			this.addChild(btn);
		}
		
		protected function MouseDown(e:MouseEvent):void 
		{
			
		}
		 
		protected function MouseUp(e:MouseEvent):void 
		{
			
		}
		
		public function update():void 
		{
		
		}
		
		public function removeListeners():void 
		{
			this.btn.removeEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
			this.btn.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
		}
	}
}